<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>饭店POS系统</title>
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="css/admin.css" />
<script src="js/jquery-2.1.1.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<div class="top">
	<div class="container-fluid head">
		<div class="row">
				<nav class="navbar navbar-inverse ">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <div class="logo"><a class="navbar-brand" href=""><img src=""/></a></div>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
      	<li><a href="index.html">菜式管理 </a></li>
        <li><a href="category.html">菜式类别管理</a></li>
        <li class="active"><a href="">顾客信息管理<span class="sr-only">(current)</span></a></li>
        <li><a href="">分类管理</a></li>
        <li><a href="">订单管理</a></li>
        <li><a href="">留言管理</a></li>
      </ul>
      <form class="navbar-form navbar-left">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="Search">
        </div>
        <button type="submit" class="btn btn-default">确定</button>
      </form>
      <ul class="nav navbar-nav navbar-right">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" >用户 <span class="caret"></span></a>
          <ul class="dropdown-menu" >
            
            <li><a href="">退出登录</a></li>
          </ul>
        </li>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
		</div>
	</div>
</div>
<div class="container-fluid" id="mainContainer">
	<div class="row">
		
			<div class="pull-left col-md-3 left">
			<ul class="list-group">
        <li class="list-group-item">顾客信息管理
          <ul class="list-group">
            <li class="list-group-item"><a href="">新增顾客信息</a></li>
          </ul>
        </li>
      </ul>
			</div>
			<div class="pull-right col-md-9 right">
			<table class="table table-striped table-hover">
      <thead>
      <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>手机号</th>
        <th>地址</th>
      </tr>
      </thead>
      <tbody id="tbody">
      </tbody>
    <tfoot>
    <tr>
      <th colspan="6"></th>
    </tr>
    </tfoot>
    </table>
			</div>
		
	</div>
</div>
<div class="bottom">
	<nav class="navbar navbar-default navbar-fixed-bottom">
  <div class="container">
    <div class="img"></div>
		<div class="foot-text"><span>CopyRight by AlexGordon</span></div>
  </div>
</nav>
</div>
</body>
<script>
$(document).ready(function(){
	$.post('customer!grid.action', function(data){
		//console.log(data);
		data = JSON.parse(data);
		//console.log(data);
		var rows = data['rows'];
		var tbody = document.getElementById("tbody");
		for(var i=0; i<rows.length; i++){
			tbody.innerHTML += "<tr>" 
			+ "<td hidden='hidden'>" + rows[i]['id'] + "</td>" 
			+ "<td>" + rows[i]['customerNo'] + "</td>" 
			+ "<td>" + rows[i]['customerName'] + "</td>" 
			+ "<td>" + rows[i]['telephone'] + "</td>" 
			+ "<td>" + rows[i]['address'] + "</td>" 
			+ "<td><a href=''>编辑</a> <a href=''>删除</a></td>" 
			+ "</tr>";
		}
	});
});
</script>
</html>